package edu.bbu.commonproject.desktop.gui.view.swing.file;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import edu.bbu.commonproject.desktop.gui.view.FileListInterface;
import edu.bbu.commonproject.desktop.gui.view.swing.file.traffic.ScrollList;

/**
 * The file list panel.
 */
public class FileListPanel extends JPanel implements FileListInterface 
{
	/** The header file list panel. */
	private HeaderFileListPanel headerFileListPanel;	
	
	/** The center file list panel. */
	private CenterFileListPanel centerFileListPanel;
	
	/** The bottom scroll list panel. */
	private ScrollList bottomScrollListPanel; 
	
	/**
	 * The constructor.
	 */
	public FileListPanel() 
	{
		this.setLayout(new BorderLayout());
		setComponents();
	}

	/**
	 * Sets up the components.
	 */
	private void setComponents() 
	{
		headerFileListPanel = new HeaderFileListPanel();
		centerFileListPanel = new CenterFileListPanel();
		bottomScrollListPanel = new ScrollList();

		this.add(headerFileListPanel, BorderLayout.NORTH);
		this.add(centerFileListPanel, BorderLayout.CENTER);
		this.add(bottomScrollListPanel, BorderLayout.SOUTH);
		
	}

	/**
	 * Gets the local file list.
	 */
	public Object getLocalFileList()
	{
		return centerFileListPanel.getLocalFileListPanel();
	}

	/**
	 * Gets the server file list.
	 */
	public Object getServerFileList()
	{
		return centerFileListPanel.getServerFileListPanel();
	}

	/**
	 * Gets the upload button.
	 */
	public Object getUploadButton()
	{
		return centerFileListPanel.getLocalFileListPanel().getControlPanel().getUploadButton();
	}

	/**
	 * Gets the download button.
	 */
	public Object getDownloadButton()
	{
		return centerFileListPanel.getServerFileListPanel().getControlPanel().getDownloadButton();
	}

	/**
	 * Gets the button scroll list.
	 */
	public Object getBottomScrollList()
	{
		return bottomScrollListPanel;
	}

	/**
	 * Gets the created local directory buttom.
	 */
	public Object getCreateLocalDirectoryButton()
	{
		return centerFileListPanel.getLocalFileListPanel().getControlPanel().getNewDirectoryButton();
	}

	/**
	 * Gets the created server directory buttom.
	 */
	public Object getCreateServerDirectoryButton()
	{
		return centerFileListPanel.getServerFileListPanel().getControlPanel().getNewDirectoryButton();
	}
	
	/**
	 * Gets the deleted local selected item buttom.
	 */
	public Object getDeleteLocalSelectedItemButton()
	{
		return centerFileListPanel.getLocalFileListPanel().getControlPanel().getDeleteButton();
	}

	/**
	 * Gets the deleted server selected item buttom.
	 */
	public Object getDeleteServerSelectedItemButton()
	{
		return centerFileListPanel.getServerFileListPanel().getControlPanel().getDeleteButton();
	}

	/**
	 * Gets the local back to parrent buttom.
	 */
	public Object getLocalBackToParrentButton()
	{
		return centerFileListPanel.getLocalFileListPanel().getControlPanel().getBackButton();
	}

	/**
	 * Gets the serve back to parrent buttom.
	 */
	public Object getServerBackToParrentButton()
	{
		return centerFileListPanel.getServerFileListPanel().getControlPanel().getBackButton();
	}

	/**
	 * Gets the local update directory content buttom.
	 */
	public Object getLocalUpdateDirectoryContentButton()
	{
		return centerFileListPanel.getLocalFileListPanel().getControlPanel().getRefreshButton();
	}

	/**
	 * Gets the server update directory content buttom.
	 */
	public Object getServerUpdateDirectoryContentButton()
	{
		return centerFileListPanel.getServerFileListPanel().getControlPanel().getRefreshButton();
	}

	/**
	 * Gets the start buttom.
	 */
	public Object getStartButton()
	{
		return bottomScrollListPanel.getControllerPanel().getStartButton();
	}

	/**
	 * Gets the pause buttom.
	 */
	public Object getPauseButton()
	{
		return bottomScrollListPanel.getControllerPanel().getPauseButton();
	}

	/**
	 * Gets the stop buttom.
	 */
	public Object getStopButton()
	{
		return bottomScrollListPanel.getControllerPanel().getStopButton();
	}

	/**
	 * Gets the remove buttom.
	 */
	public Object getRemoveButton()
	{
		return bottomScrollListPanel.getControllerPanel().getRemoveButton();
	}
	
	/**
	 * Gets the synchronize buttom.
	 */
	public Object getSyncButton()
	{
		return headerFileListPanel.getLogoFileListPanel().getSynchronizeButton();
	}

	/**
	 * Gets the logout buttom.
	 */
	public Object getLogoutButton()
	{
		return headerFileListPanel.getLogoFileListPanel().getLogoutButton();
	}
	
	/**
	 * GEts the setup buttom.
	 */
	public Object getSetupButton()
	{
		return headerFileListPanel.getLogoFileListPanel().getSetupButton();
	}
	
	/**
	 * Gets the help buttom.
	 */
	public Object getHelpButton()
	{
		return headerFileListPanel.getLogoFileListPanel().getHelpButton();
	}

	/**
	 * Gets the logout menu item.
	 */
	public Object getLogoutMenuItem()
	{
		return headerFileListPanel.getLogoutMenuItem();
	}

	/**
	 * Gets the exit menu item.
	 */
	public Object getExitMenuItem()
	{
		return headerFileListPanel.getExitMenuItem();
	}

	/**
	 * Get the upload menu item.
	 */
	public Object getUploadMenuItem()
	{
		return headerFileListPanel.getUploadMenuItem();
	}

	/**
	 * Gets the download menu item.
	 */
	public Object getDownloadMenuItem()
	{
		return headerFileListPanel.getDownloadMenuItem();
	}

	/**
	 * Gets the stat synchronize menu item.
	 */
	public Object getStartSyncMenuItem()
	{
		return headerFileListPanel.getStartSyncMenuItem();
	}

	/**
	 * Gets the serup synchronize menu item.
	 */
	public Object getSyncSetupsMenuItem()
	{
		return headerFileListPanel.getSyncSetupsMenuItem();
	}

	/**
	 * Gets the privacy setup menu item.
	 */
	public Object getPrivacySetupsMenuItem()
	{
		return headerFileListPanel.getPrivacySetupsMenuItem();
	}

	/**
	 * Gets the help menu item.
	 */
	public Object getHelpMenuItem()
	{
		return headerFileListPanel.getHelpMenuItem();
	}

	/**
	 * Gets the about menu item.
	 */
	public Object getAboutMenuItem()
	{
		return headerFileListPanel.getAboutMenuItem();
	}

}
